HatchShape HatchPatternList

Gets a list of HatchPatterns bound to the HatchShape.

public ReadOnlyCollection<HatchPattern> HatchPatternList {get}

 

Return value

ReadOnlyCollection<HatchPattern> HatchPatternList

 

Example

Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);

if (scanDocument != null)
{
    VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);

    vectorImage.SetMarkSpeed(1000);
    vectorImage.SetJumpSpeed(2000);
    vectorImage.SetJumpDelay(100);
    vectorImage.SetMarkDelay(100);

    //Set Laser Delays
    vectorImage.SetLaserOnDelay(10);
    vectorImage.SetLaserOffDelay(10);

    vectorImage.AddEllipticalArc(0, 0, 0, 10, 0, 3, 0, 120 * (float)(Math.PI / 180));

    HatchShape hatchShape = new HatchShape();

    HatchPatternLine lineHatch = new HatchPatternLine();
    lineHatch.Spacing = 0.05f;
    lineHatch.BorderGap = 0.5f;
    lineHatch.BorderGapDirection = HatchLineBorderGapDirection.Inward;
    lineHatch.LineStyle = HatchLineStyle.Serpentine;
    lineHatch.OffsetAlgorithm = HatchOffsetAlgorithm.DirectOffset;
    lineHatch.WithOffset = true;
    lineHatch.CornerStyle = HatchCornerStyle.Sharp;

    hatchShape.AddHatchPattern(lineHatch);
    hatchShape.AddHatchPatternHelixFilling(0.25f, HelixStyle.InwardToOut, HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.Sharp);

    hatchShape.AddEllipticalArc2D(0, 0, 10, 0, 3, 0, 120 * (float)(Math.PI / 180));

    vectorImage.AddHatch(hatchShape, 0);

    int hatchpatterns = hatchShape.HatchPatternList.Count();

    scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));

    try
    {
        scanDocument.StartScanning();
    }
    catch (Exception exp)
    {
        MessageBox.Show(exp.Message);
    }